package com.example.servlet.quick.start.demo;

import javax.servlet.*;
import javax.servlet.annotation.WebServlet;
import java.io.IOException;

/**
 * Servlet 3.0 之后支持注解式编程，替代在 web.xml 配置
 */
@WebServlet(urlPatterns = "/servlet/annotation", loadOnStartup = 1)
public class ServletAnnotationDemo2 implements Servlet {
    @Override
    public void init(ServletConfig config) throws ServletException {

    }

    @Override
    public ServletConfig getServletConfig() {
        return null;
    }

    @Override
    public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {
        System.out.println("servlet annotation demo2 service method excute ~~~");
    }

    @Override
    public String getServletInfo() {
        return null;
    }

    @Override
    public void destroy() {

    }
}
